﻿using Microsoft.Xna.Framework;

namespace SpaceKinect
{
    class GameObject
    {
        protected Vector3 position;
        protected Quaternion rotation;
        protected BoundingSphere bound;

        public Vector3 Position
        {
            get { return position; }
            set { position = value; }
        }
        public Quaternion Rotation
        {
            get { return rotation; }
            set { rotation = value; }
        }
        public BoundingSphere Bound
        {
            get { return bound; }
            set { bound = value; }
        }

        public void UpdateBoundSphere()
        {
            bound = new BoundingSphere(position, 0.05f);
        }

        public void MoveForward(float speed)
        {
            Vector3 addVector = Vector3.Transform(new Vector3(0, 0, -1), rotation);
            position += addVector * speed;
        }

        public virtual void Draw(Matrix projection, Matrix view) { }
    }
}
